<template>
	<div class="app">
		<catalogue documentType='合同' @nodeChoose="nodeChoose" @fileFunction="fileFunction"></catalogue>
		<div class="document-right">
			<right documentType='合同' ref="right"></right>
		</div>
	</div>
</template>

<script>
	import catalogue from './components/catalogue.vue'
	import right from '../document/components/right.vue'
	export default {
		name: 'ContractIndex',
		components:{
			catalogue,right
		},
		methods:{
			nodeChoose(data){
				if(data.data.dirType=='00'){
					if(data.label=="项目合同"){
						this.$refs.right.nodeChoose(data)
					}else{
						this.$refs.right.nodeChoosecatalogue(data)
					}
				}else{
					this.$refs.right.nodeChoose(data)
				}
			},
			fileFunction(data){
				this.$refs.right.fileFunction(data)
			}
		}
	}
</script>

<style scoped>
	.app {
		position: relative;
		flex: 1 1 auto;
		min-width: 0;
		display: flex;
		min-height: 100%;
		align-items: stretch;
	}

	.document-right {
		flex: 1;
		padding: 24px;
		height: calc(100vh - 84px);
		overflow-y: auto;
		background-color: white;
	}
</style>
